package javax.microedition.rms;

public class RecordStore {
  public String name;

  RecordStore(String paramString, boolean paramBoolean)
      throws RecordStoreException, RecordStoreNotFoundException, RecordStoreFullException {
    name = paramString;
    RecordStoreInit(paramString, paramBoolean);
  }

  public native void RecordStoreInit(String paramString, boolean paramBoolean);

  public native byte[] GetRecord(String paramString, int paramInt);

  public static native boolean IsHaveRecord(String paramString);

  public static native boolean IsHaveRecordIndex(String paramString, int paramInt);

  public static final int AUTHMODE_PRIVATE = 0;

  public static final int AUTHMODE_ANY = 1;

  public byte[] getRecord(int paramInt) throws RecordStoreException {
    if (!IsHaveRecordIndex(name, paramInt))
      throw new InvalidRecordIDException("recordId=".concat(Integer.toString(paramInt)));
    return GetRecord(name, paramInt);
  }

  //public int RecordIndex;
  public native int AddRecord(byte[] paramArrayOfbyte, int paramInt1, int paramInt2);

  public int addRecord(byte[] paramArrayOfbyte, int paramInt1, int paramInt2) throws RecordStoreException {
    return AddRecord(paramArrayOfbyte, paramInt1, paramInt2);
  }
  public native int GetNextRecordID();

  public int getNextRecordID() throws RecordStoreException {
    return GetNextRecordID();
  }
  public native int GetNumRecords();

  public int getNumRecords() throws RecordStoreNotOpenException {
    return GetNumRecords();
  }
  public native int GetRecord(int paramInt1, byte[] paramArrayOfbyte, int paramInt2);

  public int getRecord(int paramInt1, byte[] paramArrayOfbyte, int paramInt2) throws RecordStoreException {
    return GetRecord(paramInt1,paramArrayOfbyte,paramInt2);
  }
  public native int GetRecordSize(int paramInt);
  public int getRecordSize(int paramInt) throws RecordStoreException {
    return GetRecordSize(paramInt);
  }
  public native int GetSize();

  public int getSize() throws RecordStoreNotOpenException {
    return GetSize();
  }
  public native int GetSizeAvailable();
  public int getSizeAvailable() throws RecordStoreNotOpenException {
    return GetSizeAvailable();
  }

  public int getVersion() throws RecordStoreNotOpenException {
    return 0;
  }

  public String getName() throws RecordStoreNotOpenException {
    return name;
  }

  public RecordEnumeration enumerateRecords(RecordFilter paramRecordFilter, RecordComparator paramRecordComparator,
      boolean paramBoolean) throws RecordStoreNotOpenException {
    return null;
  }

  public long getLastModified() throws RecordStoreNotOpenException {
    return 0L;
  }
  public static native String[] ListRecordStores();

  public static String[] listRecordStores() {
    return ListRecordStores();
  }

  public static RecordStore openRecordStore(String paramString, boolean paramBoolean) throws RecordStoreException {
    return openRecordStore(paramString, paramBoolean, 0, true);
  }

  public static RecordStore openRecordStore(String paramString, boolean paramBoolean1, int paramInt,
      boolean paramBoolean2) throws RecordStoreException {
    if (paramString.startsWith("/"))
      paramString = paramString.substring(1);
    if (!paramBoolean1 && !IsHaveRecord(paramString))
      throw new RecordStoreNotFoundException(paramString);
    return new RecordStore(paramString, paramBoolean1);
  }

  public static RecordStore openRecordStore(String paramString1, String paramString2, String paramString3)
      throws RecordStoreException {
    return openRecordStore(paramString1,true);
  }
  public static native void DeleteRecordStore(String paramString);

  public static void deleteRecordStore(String paramString) throws RecordStoreException {
    DeleteRecordStore(paramString);
  }

  public void addRecordListener(RecordListener paramRecordListener) {
  }

  public void closeRecordStore() throws RecordStoreException {
  }
  public native void DleteRecord(int paramInt);
  public void deleteRecord(int paramInt) throws RecordStoreException {
    DleteRecord(paramInt);
  }

  public void removeRecordListener(RecordListener paramRecordListener) {
  }

  public void setMode(int paramInt, boolean paramBoolean) throws RecordStoreException {
  }

  public void setRecord(int paramInt1, byte[] paramArrayOfbyte, int paramInt2, int paramInt3)
      throws RecordStoreException {
      SetRecord(paramInt1, paramArrayOfbyte, paramInt2, paramInt3);
  }

  public native void SetRecord(int paramInt1, byte[] paramArrayOfbyte, int paramInt2, int paramInt3);

}

/*
 * Location: C:\Java\rt\javax\microedition\midp_2.1.jar!\javax\microedition\rms\
 * RecordStore.class
 * Java compiler version: 3 (47.0)
 * JD-Core Version: 1.1.3
 */